/**
 * Description
 *
 * Creation Date 27/12/2017
 * @author Candy
 */
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
// import { is, fromJS} from 'immutable';
import { IoChevronLeft } from 'react-icons/lib/io';

export default class HeaderNav extends Component {
	constructor(props) {
		super(props);
	}

	render() {
		return (
			<div className="header-container">
				{
					this.props.title == 'home' && (
						<Link to="/" className="logo-container">
							<img alt="SmartBuyGlasses" src="https://4eb7f3de389ff6b61816-1dd1d9fd8ad438da629d92a7640b81cb.ssl.cf1.rackcdn.com/GDR2016/GDR477/DESKTOP/Ten_Years_Logo_1.png" className="logo" />
						</Link>
					)
				}
				{
					this.props.title == 'category' && (
						<div className="header-back"><a onClick={() => this.props.history.goBack()}  className="icon-style"><IoChevronLeft/></a> <p>{ this.props.content } </p></div>
					)
				}
				{
					this.props.title == 'product' && (
						<div className="header-back"><a onClick={() => this.props.history.goBack()}  className="icon-style"><IoChevronLeft/></a> <Link to="/" className="logo-container">
							<img alt="SmartBuyGlasses" src="https://4eb7f3de389ff6b61816-1dd1d9fd8ad438da629d92a7640b81cb.ssl.cf1.rackcdn.com/GDR2016/GDR477/DESKTOP/Ten_Years_Logo_1.png" className="logo" />
						</Link></div>
					)
				}
			</div>
		)
	}
}